package cn.kai.ums.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName ums_special
 */
@TableName(value ="ums_special")
@Data
public class UmsSpecial implements Serializable {
    /**
     * 专业自增id
     */
    @TableId(type = IdType.AUTO)
    private Integer specialId;

    /**
     * 专业编号，由所在学院编号（2位）+数字（2位）组成
     */
    private String specialNo;

    /**
     * 专业名称
     */
    private String specialName;

    /**
     * 专业所在学院编号
     */
    private String specialCollegeNo;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        UmsSpecial other = (UmsSpecial) that;
        return (this.getSpecialId() == null ? other.getSpecialId() == null : this.getSpecialId().equals(other.getSpecialId()))
            && (this.getSpecialNo() == null ? other.getSpecialNo() == null : this.getSpecialNo().equals(other.getSpecialNo()))
            && (this.getSpecialName() == null ? other.getSpecialName() == null : this.getSpecialName().equals(other.getSpecialName()))
            && (this.getSpecialCollegeNo() == null ? other.getSpecialCollegeNo() == null : this.getSpecialCollegeNo().equals(other.getSpecialCollegeNo()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getSpecialId() == null) ? 0 : getSpecialId().hashCode());
        result = prime * result + ((getSpecialNo() == null) ? 0 : getSpecialNo().hashCode());
        result = prime * result + ((getSpecialName() == null) ? 0 : getSpecialName().hashCode());
        result = prime * result + ((getSpecialCollegeNo() == null) ? 0 : getSpecialCollegeNo().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", specialId=").append(specialId);
        sb.append(", specialNo=").append(specialNo);
        sb.append(", specialName=").append(specialName);
        sb.append(", specialCollegeNo=").append(specialCollegeNo);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}